from django.shortcuts import render
from django.http import HttpResponse, JsonResponse


def index(request):
    res = HttpResponse()
    res.content = "好了"
    # res.content_type =
    res['X-Token'] = 'hello'
    return res


def jsons(request):
    per = {
        'a': 'sss',
        'b': 'sssdsd'
    }
    list = [
        {
        'a': 'sss',
        'b': 'sssdsd'
        },
        {
            'c': 'sss',
            'd': 'sssdsd'
        }
    ]
    return JsonResponse(list, safe=False)